<include file="public:header" />
<include file="public:left" />
<div >
    <form method="post" action="">
        <label>所属分类搜索：</label>
        <select class="form-control width20 rows_display" name="classify">
            <volist name="classify" id="val">
                <option value="{$val.id}"  <if condition="$select['classify_id'] eq $val['id']" > selected</if>>{$val.name}</option>
            </volist>
        </select>
        <button type="submit" class="btn btn-primary">搜索</button>
    </form>
    <button type="button" class="btn btn-primary" onclick="window.location.href='{:U('Modules/addView')}'">添加</button>
    <br>
    <br>
    <table id="sample-table-1" class="table table-striped table-bordered table-hover wrfont14">
        <thead>
        <tr>
            <th>ID</th>
            <th>模块名称</th>
            <th>Url</th>
            <th>归属分类</th>
            <th width="200px">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="val">
            <tr>
                <td  role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne{$val.id}" aria-expanded="true" aria-controls="collapseOne{$val.id}">{$val.id}</td>
                <td  role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne{$val.id}" aria-expanded="true" aria-controls="collapseOne{$val.id}">{$val.name}</td>
                <td  role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne{$val.id}" aria-expanded="true" aria-controls="collapseOne{$val.id}">{$val.url}</td>
                <td  role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne{$val.id}" aria-expanded="true" aria-controls="collapseOne{$val.id}">{$val.classify_name}</td>
                <td>
                    <a href="{:U('Modules/editorView?id='.$val['id'])}" class="btn btn-warning btn-sm ">编辑</a>
                    <a href="{:U('Modules/delete?id='.$val['id'])}" class="btn btn-danger btn-sm ">删除</a>
                    <a href="{:U('Modules/funcAddView?id='.$val['id'])}" class="btn btn-primary btn-sm ">添加动作</a>
                </td>
            </tr>
            <if condition="$val['func_list'] neq ''" >
            <tr>
                <td colspan="5">
                    <div class="panel-collapse collapse" id="collapseOne{$val.id}"   role="tabpanel" aria-labelledby="headingOne">
                        <div class="panel-body">
                            <table style="margin:0px" class="table table-striped table-bordered table-hover wrfont14">
                                <volist name="val.func_list" id="val2">
                                <tr class="warning">
                                    <td>{$val2.name}</td>
                                    <td>{$val2.url}</td>
                                    <td width="200px">
                                        <a href="{:U('Modules/funcEditorView?id='.$val2['id'])}" class="btn btn-warning btn-sm">编辑</a>
                                        <a href="{:U('Modules/funcDelete?id='.$val2['id'])}" class="btn btn-danger btn-sm ">删除</a>
                                    </td>
                                </tr>
                                </volist>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
            </if>
        </volist>
        </tbody>
    </table>
</div>
<div class="tk_content_page" style="width:100%">{$page}</div>
<include file="public:footer" />